package com.doculibre.constellio.connector.twitter;

import com.doculibre.constellio.connector.persistence.config.PersistenceContext;
import com.google.enterprise.connector.spi.AuthenticationManager;
import com.google.enterprise.connector.spi.AuthorizationManager;
import com.google.enterprise.connector.spi.Session;
import com.google.enterprise.connector.spi.TraversalManager;

/**
 * 
 * Twitter Session
 * 
 * @author France Labs
 * 
 */
public class TwitterSession implements Session {
	
	private String twitterAccount;
	private PersistenceContext persistenceContext;

	public TwitterSession(PersistenceContext persistenceContext, String twitterAccount){
		this.persistenceContext = persistenceContext;
		this.twitterAccount = twitterAccount;
	}
	
    public AuthenticationManager getAuthenticationManager() {
	      return new TwitterAuthenticationManager();
	    }

	    public AuthorizationManager getAuthorizationManager() {
	      return new TwitterAuthorizationManager();
	    }

	    public TraversalManager getTraversalManager() {
	      return new TwitterTraversalManager(persistenceContext, twitterAccount);
	    }
	    }
